<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="button" id="btn" value="点我" onclick="settime(this)" />  
		<script type="text/javascript">  
		var countdown=100;  
		function settime(val) {  
		if (countdown == 0) {  
		val.removeAttribute("disabled");  
		val.value="点我";  
		countdown = 5;  
		} else {  
		val.setAttribute("disabled", true);  
		val.value=" 点击无效(" + countdown + ")";  
		countdown--;  
		setTimeout(function() {  
		settime(val)  
		},1000)  
		}  
		}  
		</script>  
	</body>
</html>
